package com.bitcola.security.activity.biz;

import com.bitcola.security.activity.feign.IDataServiceFeign;
import com.bitcola.security.activity.mapper.BalanceChangeLogMapper;
import com.bitcola.security.activity.mapper.ColaUserBalanceMapper;
import com.bitcola.security.activity.mapper.RedPacketHelpLogMapper;
import com.bitcola.security.activity.mapper.WithDrawInMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class KycBiz {
    @Autowired
    BalanceChangeLogMapper balanceChangeLogMapper;
    @Autowired
    RedPacketHelpLogMapper redPacketHelpLogMapper;
    @Resource
    IDataServiceFeign dataServiceFeign;

    @Autowired
    WithDrawInMapper withDrawInMapper;
    @Autowired
    ColaUserBalanceMapper colaUserBalanceMapper;

    @Autowired
    BalanceChangeBiz balanceChangeBiz;
    @Transactional
    public void prizeInvitor(String userId)
    {

//        var user= dataServiceFeign.findUserInvitor(userId);
//        if(user!=null) {
//            balanceChangeBiz.createChange(user.getId(), BalanceTypeConstants.prize_balance_frozen, PrizeConstant.PRIZE_INVITOR, BigDecimal.valueOf(10), FinancialConstant.UNLOCKIN,"USDT");
//            colaUserBalanceMapper.changeUserBanlance(user.getId(),"USDT",BigDecimal.ZERO,BigDecimal.ZERO,BigDecimal.valueOf(10),BigDecimal.ZERO,BigDecimal.ZERO, EncoderUtil.BALANCE_KEY);
//
//
//        }



    }

    @Transactional
    public void prizeSelf(String userId){
//
//        balanceChangeBiz.createChange(userId, BalanceTypeConstants.BALANCE,"", BigDecimal.valueOf(100), FinancialConstant.ACTIVITY_REWARD,"DOC");
//        colaUserBalanceMapper.changeUserBanlance(userId,"DOC",BigDecimal.valueOf(100),BigDecimal.ZERO,BigDecimal.ZERO,BigDecimal.ZERO,BigDecimal.ZERO, EncoderUtil.BALANCE_KEY);

    }

}
